package timeClock;
import java.util.ArrayList;

import java.awt.*;
import javax.swing.*;
import java.net.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.io.IOException;



public class getinfo {
		
	public getinfo()
	{
	}
	public String get() 
	{
		String temp = "";
		try{
			
			ClassLoader cldr = this.getClass().getClassLoader();
			URL url = cldr.getResource("temp.html");
			
			URLConnection conn = url.openConnection();
			BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
			String HTML = "poop";
			while((HTML = rd.readLine()) != null)
			{
				if(HTML.startsWith("			<font color=") && HTML.endsWith(".</b></font>")||HTML.startsWith("			<font color=\"red\"><b>You do not have permission") || HTML.startsWith("			<font color=\"green\"><b>Successful punch in"))
				{
					
					temp = HTML + "\n";
				}
				
			}
			System.out.println(temp);
		}
		
		catch ( Exception e )
		{
			e.printStackTrace();

		}
		

		return temp;
	}			
	

}
